Change do_IRQ high bit masking.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 28 Mar 2006 13:19:22 +0000 (14:19 +0100)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 28 Mar 2006 13:19:22 +0000 (14:19 +0100)
Allow more than 256 interrupt vectors on native by only setting the
highest bit when marking orig_eax to indicate that we're not within
a system call.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S
linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c
linux-2.6-xen-sparse/drivers/xen/core/evtchn.c

index ec17d1c91fdaa997898c2205eebdb044e9ec5796..3d05727fdf67a00f3d4ac23b3a09e7003918bf02 100644 (file)
@@ -462,7 +462,7 @@ vector=0
 ENTRY(irq_entries_start)
 .rept NR_IRQS
        ALIGN
-1:     pushl $vector-256
+1:     pushl 0x80000000+$vector
        jmp common_interrupt
 .data
        .long 1b
@@ -479,7 +479,7 @@ common_interrupt:
 
 #define BUILD_INTERRUPT(name, nr)      \
 ENTRY(name)                            \
-       pushl $nr-256;                  \
+       pushl 0x80000000+$nr;           \
        SAVE_ALL                        \
        movl %esp,%eax;                 \
        call smp_/**/name;              \
index d4b97538e0a55a2b2d42025075a3bbe35cbd1d1c..b1d8634bd6b0c435cc03c96dbd170e525439b9e0 100644 (file)
@@ -53,8 +53,8 @@ static union irq_ctx *softirq_ctx[NR_CPUS];
  */
 fastcall unsigned int do_IRQ(struct pt_regs *regs)
 {      
-       /* high bits used in ret_from_ code */
-       int irq = regs->orig_eax & __IRQ_MASK(HARDIRQ_BITS);
+       /* high bit used in ret_from_ code */
+       int irq = regs->orig_eax & __IRQ_MASK(BITS_PER_LONG - 1);
 #ifdef CONFIG_4KSTACKS
        union irq_ctx *curctx, *irqctx;
        u32 *isp;
index 08b5f53f6af7808e793fa449f7edfedbb0086f14..ea24701bb81ba7eef4b0e46165634894b162da54 100644 (file)
@@ -584,7 +584,7 @@ retint_kernel:
  */            
        .macro apicinterrupt num,func
        INTR_FRAME
-       pushq $\num-256
+       pushq 0x8000000000000000+$\num
        CFI_ADJUST_CFA_OFFSET 8
        interrupt \func
        jmp error_entry
index c64715db9e8ca50e392c1e63c9c3c626244d26a5..663e890c943c5eb6ae82440f4023e09d00e8fe54 100644 (file)
@@ -96,8 +96,8 @@ skip:
  */
 asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
 {      
-       /* high bits used in ret_from_ code  */
-        int irq = regs->orig_rax & __IRQ_MASK(HARDIRQ_BITS);
+       /* high bit used in ret_from_ code  */
+        int irq = regs->orig_rax & __IRQ_MASK(BITS_PER_LONG - 1);
 
        exit_idle();
        irq_enter();
index 5fbd1e087a842ce3d8611f103e3fba5f64058638..6dee25cab75fc7b40dcfb6e10171c3935d58e7b5 100644 (file)
@@ -170,9 +170,9 @@ static inline void exit_idle(void) {}
 #include <asm/idle.h>
 #define IRQ_REG orig_rax
 #endif
-#define do_IRQ(irq, regs) do {                 \
-       (regs)->IRQ_REG = (irq);                \
-       do_IRQ((regs));                         \
+#define do_IRQ(irq, regs) do {                                 \
+       (regs)->IRQ_REG = (irq) | (1UL << (BITS_PER_LONG - 1)); \
+       do_IRQ((regs));                                         \
 } while (0)
 #endif